-webkit-text-stroke
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2017.
No estándar: Esta función no está estandarizada. No recomendamos usar funciones no estándar en producción, ya que tienen un soporte limitado en los navegadores y pueden cambiar o eliminarse. Sin embargo, pueden ser una alternativa adecuada en casos específicos donde no exista una opción estándar.
Resumen
La propiedad CSS -webkit-text-stroke
especifica la anchura y color del trazo para los caractéres de texto. Esta forma es una manera corta en relación con la forma larga que necesita usar las propiedades-webkit-text-stroke-width
y -webkit-text-stroke-color
.
Valor inicial | as each of the properties of the shorthand:
|
---|---|
Applies to | all elements |
Heredable | yes |
Valor calculado | as each of the properties of the shorthand:
|
Animation type | as each of the properties of the shorthand:
|
Síntaxis
/* Valores anchura y color */
-webkit-text-stroke: 4px navy;
/* Valores globales */
-webkit-text-stroke: inherit;
-webkit-text-stroke: initial;
-webkit-text-stroke: unset;
Valores
Síntaxis Formal
Ejemplo
HTML
<p id="example">El trazo de este texto es rojo.</p>
CSS
#example {
font-size: 50px;
margin: 0;
-webkit-text-stroke: 2px red;
}
Especificaciones
Specification |
---|
Compatibility # the-webkit-text-stroke |